package com.scheduledtest.demo;

import com.scheduledtest.demo.impl.registerBeanDefinition_TEST;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Task {

    @Autowired
    private ApplicationContext applicationContext;


    @Scheduled(cron = "0 0/1 * * * ?")
    public void test1() {
        registerBeanDefinition_TEST xxx = (registerBeanDefinition_TEST) applicationContext.getBean("xxx");
        xxx.test();
    }
}
